User blog:Unin/MLOLTL: HUD/HMD displayables... on display
So, taking another break from chapter 3... but this time doing something constructive*! I wanted to get Heads Up displays out of the way so I can just pop them in for TSF cockpit scenes. Initially, I figured this would be an extremely complicated mess of overpping sprites, but some test scenes showed this fear to be completely unfounded. In actuality, its going to be an extremely complicated mess of overlapping canvas renders. Huzzah! As many may have noticed, rUGP handles the HUD in MLA substantially differently than in MLU (or valgernon's HUD in MLE for that matter). In MLE/MLU, the HUD was a series of transparent sprite overlays. However MLA upped its game to a dynamic display complete with simulated avionics data and that awesome, old-school, heavily aliased, phosphor-screen monochrome, moving indicators. I have no intention of weaning myself off the later to return to the simplicity of the former. So, rather than chunking the display into sprites, I'm coding my own displayable so I can manipulate them on the fly. This means defining each object and anticipating what sort of movement I'm going to need out of it. To do this, I'll first need to dissect MLA's HUD. First off, we can rule out everything that can be accomplished sprite-wise *Radar *Comms *Ammunition *Weapons Selection *Damage Indicator *Unintelligible Menu Directory Fluff That leaves basically our Rectangle of Doom (RoD) in the center, which requires further dissection *On the right, we have an (air)speed column. It slides vertically as speed changes, but never moves from it's position on the screen. to mimic this, We'll need a surface several times taller than the RoD, which I can change the ypos why cropping in kind to keep it in it's place **The speed column also has an actual speed readout to the right of the RoD. This will require a displaybox, and some maths to generate a string that hovers around whatever number we want it to display. Sure, we could go with a sprite with a hardcoded number, and pretend we have perfect cruise-control, but the whole point of this endeavor is to make the HUD look alive. *In the center of the RoD we have the pitch ladder. Like the speed indicator, we want this to scroll vertically to represent changes in pitch... though sometimes I've noticed it change according to the pilot's focus (eg vision tracking). There's also some funky coloring as well. Everything above 00 (level) is happy teal, pitch down to -10, and the ladder goes noseplant warning yellow. Go bellow -10, and we see FUCKYOUPULLUPPULLUP red. This seems like a simple solution for sprites, but the pitch ladder also rotates to indicate roll (making line 00 an artificial horizon), and I loves me my aliasing, so vector it is. *Straddling both sides of the pitch ladder is Altitude indicator, which for some reason still gives readings relative to sea-level rather than the actuall surface... odd for a tSf, especially since somebody had to actually think about it and then went through the trouble of researching elevation for real life locations (btw: holy detailgasm, Age) but oh well. This scrolls in the opposite direction as the pitch ladder, unless the TSF is standing still and just turning sensors. This also goes red below sea level, as seen in the lower levels of Yokohama base, as well as within the Original Hive. Implementation is fairly analogous to the pitch ladder, except it's always vertical (does not roll) *Finally, at the bottom of the RoD is the Heading (yaw) indicator. To be honest, I'm leaning towards making this simply a long sprite that crops while it pans to give the illusion of scrolling, but I also want to have a function were I can just give it a direction and it scrolls to that direction, rather than hard coding it, so I can again throw some maths at it and let it hover/shift around the general heading as it moves. *Finally, for JMDF/IRG HUDs, there is a flightpath-marker/targeting reticule center screen. not sure if I want to give this any functionality or not, but as long as I'm prepping for the future, I figured I'd knock out both HUD styles. =*not guaranteed. = Category:Blog posts